<style type="text/css">
    form {
        width: 80%;
        padding-left: 40px;
        padding-top: 10px;

    }

    th {
        line-height: 30px !important;
        text-align: right !important;
    }

    input[type="text"], select, textarea {
        width: 90%;
        min-width: 90%;
        height: 30px !important;
        margin-bottom: 0px !important;
    }

    input[type="radio"] {
        width: 20px !important;
        height: 20px;
    }
</style>
<link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrap.css" rel="stylesheet"/>
<div>
    <form style="margin:20px 30px;" id="vdeliveryForm">
        <table class="table table-bordered">
            <tr>
                <th>预计提货时间：</th>
                <td><input type="text" name="expected_pickup_time" id="expected_pickup_time" class="Wdate form-date"/>
                </td>
            </tr>
            <tr>
                <th>实际发货时间：</th>
                <td><input type="text" name="pickup_time" id="pickup_time" class="Wdate form-date"/></td>
            </tr>
            <tr>
                <th>点击发货时间：</th>
                <td><input type="text" name="pickup_op_time" id="pickup_op_time" class="Wdate form-date"/></td>
            </tr>
            <tr>
                <th>点击发货操作人：</th>
                <td><input type="text" name="pickup_op_user_id"/><span style="color: red">*</span></td>
            </tr>
            <tr>
                <th>货代名称：</th>
                <td><input type="text" name="name"/><span style="color: red">*</span></td>
            </tr>
            <tr>
                <th>结款方式：</th>
                <td><input type="text" name="paymethod"/><span style="color: red">*</span></td>
            </tr>
            <tr>
                <th>计费方式：</th>
                <td><input type="text" name="billingway"/><span style="color: red">*</span></td>
            </tr>
        </table>
        <div id="sub" class="btn btn-primary jsSearchBtn" style="margin-left:48%; padding:8px 30px;">确定</div>
    </form>
</div>

<script type="text/javascript" src="__PUBLIC__/javascripts/admin/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/javascripts/admin/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/javascripts/admin/layer/layer.js"></script>
<script type="application/javascript">
    $(function () {

        $("#sub").on('click', function () {
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            layer.load();
            $.ajax({
                url: "{:U('Transportplan/doVerifyDelivery')}",
                type: 'post',
                async: true, //default: true
                data: $('#vdeliveryForm').serialize(),
                dataType: 'json', // default: Intelligent Guess (xml, json, script, or html)
                success: function (data, textStatus, jqXHR) {
                    layer.closeAll('loading');
                    layer.msg(data);
                    setTimeout(function () {
                        if (data == '标记成功') {
                            parent.location.reload();
                            parent.layer.close(index); //执行关闭
                        }
                    }, 1000)
                }
            })
        })
        /**
         * 日期时间选择
         */
        $('#expected_pickup_time,#pickup_time,#pickup_op_time').click(function () {
            WdatePicker({skin: 'twoer', dateFmt: 'HH:mm:00'})
        })


    })
</script>


